{config_load file='site.conf' section='site_edit'}
{include file='header.tpl'}
{literal}
 <SCRIPT LANGUAGE="JavaScript">
 <!--	
  $().ready(function() {		   
		$("#blogForm").validate({
			rules: {
				blog_title: "required",
				blog_url: {
					required: true,
					url: true
				},
				rss_url: {
					url: true
				}
			},
			messages: {
				blog_title: "ブログのタイトルは必須です",
				blog_url: {
					required: "ブログのURLは必須です",
					url: "正しくURLを入力してください。"
				},
				rss_url: {
					url: "正しくURLを入力してください。"
				}
			}
		});
	
	});
 		   
	function doBack()
	{
		location.href="site_index.php?title="+$("#title").attr("value");
	}
 //-->
 </SCRIPT>
{/literal}


<div id="bg">
	<div id="page">
		<div id="content">
		{if $msg ne ""}<div class="errorMsg">{$msg}</div>{/if}
			<div class="post">
				<h2 class="title">ブログ編集</h2>
				<div class="entry">
				<form id="blogForm" name="blogForm" action="{$SCRIPT_NAME}" method="post" >
				<input type="hidden" name="action" id="action" value="update"/>
				<input type="hidden" name="blogId" id="blogid" value="{$formvars.blogId|escape}"/>
				<input type="hidden" name="title" id="title" value="{$formvars.title|escape}" />
				<table width="600" id="tb_form">
				  <tr>
				    <th width="150" >ブログID</th>
				    <td width="450" >{$rslt.urllist_id|escape}</td>
				  </tr>
				  <tr>
				    <th>タイトル<span class="required">(必須)</span></th>
				    <td><input name="blog_title" type="text" id="blog_title" size="50" maxlength="200" value="{$rslt.blog_title|escape}"></td>
				  </tr>
				  <tr>
				    <th>URL<span class="required">(必須)</span></th>
				    <td><input name="blog_url" type="text" id="blog_url" size="50" maxlength="200" value="{$rslt.blog_url|escape}">
				      <a href="{$rslt.blog_url|escape}" target="_blank">外部リンク</a></td>
				  </tr>
				  <tr>
				    <th>RSS URL </th>
				    <td><input name="rss_url" type="text" id="rss_url" size="50" maxlength="200" value="{$rslt.rss_url|escape}"></td>
				  </tr>
				   <tr>
				    <th>ステータス</th>
				    <td>
					{html_radios name=open_flag options=$statusList selected=$rslt.open_flag}
					</td>
				  </tr>
				  <tr>
				    <th>国</th>
				    <td>
					{html_options name=country_id options=$countryList selected=$rslt.country}
					</td>
				  </tr>
				  <tr>
				    <th>言語</th>
				    <td>
					{html_options name=lang_id options=$langList selected=$rslt.lang_id}
					</td>
				  </tr>
				  <tr>
				    <th >クローラー巡回頻度</th>
				    <td >
					{html_radios name=crawler_rank options=$crawlerrankList selected=$rslt.crawler_rank}
				    </td>
				  </tr>
				  <tr>
				    <th>文字コード</th>
				    <td>
					{html_options name=enc options=$encList selected=$rslt.enc}
					</td>
				  </tr>
				  <tr>
				    <th width="150" >&nbsp;</th>
				    <td width="450" >       
					<input type="submit" value="更新" class="submitButton">
				    <input type="reset"  value="リセット" class="submitButton">
					<input type="button"  value="戻る" OnClick="doBack();" class="submitButton"></td>
				  </tr>
				</table>
				<br>
				</form>				
			 	 </div>
			</div>
		</div>
		<!-- end #content -->
		<!-- end #sidebar -->
		<div style="clear: both; height: 20px;">&nbsp;</div>
	</div>
	<!-- end #page -->
</div>
{include file='footer.tpl'}


</body>
</html>
